/**
 * Created by KY on 2017/4/14.
 */
define(['ldfw/core','ldfw/ldlibs/dict','router','comps/session'], function (LDFW,dict,router,session) {
    const Application = LDFW.Application.extend({
        el: 'html',
        initialize: function () {
            this.router = router
            this.dict = dict;
            this.curr_cust = session.getCurrentUser()
        },
        start: function () {
            const _this = this
            Backbone.history.start()
            this.render();
        },
        getDict: function (key, item) {
            var items = this.dict.get(key);
            if (items !== null && _.has(items, item)) {
                return items[item]
            }
            return item
        },
        getDictItems: function (key) {
            var items = this.dict.getDictItems(key);
            return items
        }
    })
    return new Application()
})